From: Eli Zaretskii Date: Wed, 9 May 2001 15:34:53 +0000 (+0000) Subject: (tar-extract): Pay attention to the value of X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~40404 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cef5b96f8cf7508d494f6fb34dac021a9a3cda78;p=emacs.git (tar-extract): Pay attention to the value of coding-system-for-read, if it is non-nil. --- diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 264bc37f2e6..fac148b2b63 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -716,10 +716,11 @@ appear on disk when you save the tar-file's buffer." ;; We need to mimic the parts of insert-file-contents ;; which determine the coding-system and decode the text. (let ((coding - (and set-auto-coding-function - (save-excursion - (funcall set-auto-coding-function - name (- (point-max) (point)))))) + (or coding-system-for-read + (and set-auto-coding-function + (save-excursion + (funcall set-auto-coding-function + name (- (point-max) (point))))))) (multibyte enable-multibyte-characters) (detected (detect-coding-region 1 (min 16384 (point-max)) t)))